package com.itheima.service.impl;

import com.itheima.dao.StuDao;
import com.itheima.entity.Student;
import com.itheima.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class StuServiceImpl implements StuService {
    @Autowired
    private StuDao stuDao;

    @Override
    @Transactional
    public int insert(Student student) {
        return stuDao.insert(student);
    }

    @Override
    public List<String> list() {
        return stuDao.list();
    }
}
